<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2018/12/10
 * Time: 15:07
 */
namespace app\admin\controller;
use app\admin\model\SettingModel;
class Setting extends BaseController
{
    //比例显示界面
    public function index(){
        $SettingModel=new SettingModel();
        $res=$SettingModel->AllData();
        return view('index',['res'=>$res[0],'page'=>$res[1]]);
    }
    //修改比例界面
    public function upda(){
        $SettingModel=new SettingModel();
        $res=$SettingModel->OneData(input('id'));
        return view('upda',['res'=>$res]);
    }
    //修改操作
    public function updatedata(){
        $SettingModel=new SettingModel();
        $res=$SettingModel->updata(input('id'),input('value'));
        return $res;
    }
}